{% extends "data_list.html" %} {% block headjs%} {% endblock %} {% load i18n %} {% block extracss %} {% endblock %} {% block addjs %} $(function(){ $(".div_inline").append($("#id_show_dept_data")); $(".div_inline").addClass("showDeptTree"); $("#id_show_dept_data").show(); $("#id_show_dept_data").find("#id_show_dept_tree").css({height:$(".dt_bdiv").height()+42}); $("#id_spn_refresh").click(function(){ $.ajax({ type: "POST", url:"{{dbapp_url}}personnel/Department/choice_data_widget?depttree=True", dataType:"html", success:function(json){ var data = json; $("#id_show_dept_tree").html(""); $("#id_show_dept_tree").html(data); $("#id_show_dept_tree").find("#id_personnel__Department").css({height:$(".dt_bdiv").height()+40, width:'100%'}); $("#id_show_dept_tree").find("#show_deptment").css({width:'98%'}); } }); }); $("#id_spn_refresh").click(); after_init = function(){ $("#id_show_dept_data").hide(); $(".div_ListAndFilter").css("width","100%") }; after_close=function(){ $("#id_show_dept_data").show(); $(".div_ListAndFilter").css("width","70%") }; after_submit = function(){ $("#id_spn_refresh").click(); }; }) //点击树形空间,左边表格刷新 function reflash_child_dept_list(event, treeId, treeNode){ var parent_id = treeNode.id; var strwhere=[]; strwhere.push("parent__id__exact="+parent_id); var $grid = $("#id_datalist"); var datalist=$grid.get(0); datalist.g.init_query=strwhere; datalist.g.load_data(); } function after_ztree(){ $("#id_show_dept_tree").find(".ztree").parent().css({height:$(".dt_bdiv").height()+32}); } {% endblock %} {% load personnel_tags %} {% block addition_content %} {% endblock %}